package com.kyh.util;

public abstract class CheckUtil {
	
	/**
	 * 无效的字符串
	 */
	public static final String STR_INVALID = "-1";
	
	/**
	 * 无效的数字
	 */
	public static final int INT_INVALID = -1;
	
	/**
	 * 无效的数值
	 */
	public static final int NUM_INVALID = -1;
	
	public static boolean notJA(String JA) {
		if (JA == null || "".equals(JA) || !JA.startsWith("[") || !JA.endsWith("]")) {
			return false;
		} else {
			return true;
		}
	}
	
	public static boolean notNull(Object obj) {
		if (obj == null) {
			return false;
		} else {
			return true;
		}
	}
	
	public static boolean notNull(Integer i) {
		if (i == null) {
			return false;
		} else {
			return true;
		}
	}
	
	public static boolean notNull(Long l) {
		if (l == null) {
			return false;
		} else {
			return true;
		}
	}
	
	public static boolean notNull(Double dou) {
		if (dou==null) {
			return false;
		} else {
			return true;
		}
	}
	
	public static boolean notNull(String str) {
		if (str==null || "".equals(str) || str.isEmpty() || "null".equals(str)) {
			return false;
		} else {
			return true;
		}
	}
	
	public static boolean notNum(int num) {
		if (num == INT_INVALID) {
			return false;
		} else {
			return true;
		}
	}
	
	public static boolean notNum(long num) {
		if (num == INT_INVALID) {
			return false;
		} else {
			return true;
		}
	}
}
